var myChart = echarts.init(document.getElementById("container"));

option = {
	 title: {
		 // left:"center",
        text: '温度图堆叠',
		textStyle:{
			color:"#58FAF4"
		},
		subtext:""
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
		left:"right",
        data: ['环境', '电机', '轴承'],
		textStyle:{
			color:"rgb(128, 128, 128)"
		}
    },
    xAxis: {
        type: 'category',
        data: ['1', '2', '3', '4', '5', '6', '7']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
		name:"环境",
        data: [50, 30, -24, -18, 35, 47, 60],
        type: 'line'
    },{
		name:"电机",
		data: [15, 23, 22, 21, -13, -14, 26],
		type: 'line'
	},{
		name:"轴承",
		data: [-18, -33, 22, 25, 17, 18, 85],
		type: 'line'
	}
	]
};

// setInterval(function () {
//     option.series[0].data[0].value = (Math.random() * 100).toFixed(2) - 0;
//     myChart.setOption(option, true);
// }, 2000);

// if (option && typeof option === 'object') {
    myChart.setOption(option);
// }